<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>console常见报错集锦</title>
  <h4>1.Uncaught ReferenceError: a is not defined</h4>
  <h4>[Vue warn]: Error in render: "TypeError: Cannot read property 'a' of undefined"
    TypeError: Cannot read property 'a' of undefined</h4>
  <p>原因：变量a或者方法a未定义</p>
  <hr>
  <h4>2.[Vue warn]: Invilid prop: type check failed for prop "value".Expected Number, got String</h4>
  <p>原因：变量value赋值类型不对，应该赋值XXX,确得到了YYY</p>
  <hr>
  <h4>3.[Vue warn]: Error in v-on handler: "TypeError: Cannot read property 'focus' of undefined"</h4>
  <p>例如以下情况：this.$refs.myInput.focus报如上错</p>
  <p>原因：这种情况是因为this.$refs.myInput取值为undefined，而undefined不能调用方法或者获取属性</p>
  <hr>
  <h4>4.[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component
    re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "totalPrice"
  </h4>
  <p>原因：vue子组件不能直接修改props接收的来自父组件所传的值,props当做只读属性</p>
  <hr>
</head>

<body>
  <script>

  </script>
</body>

</html>